import time
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC

service = Service(executable_path=r"C:\Users\yckon\Desktop\chromedriver-win64\chromedriver.exe")


driver = webdriver.Chrome(service=service)


driver.get('http://vdts.ivdc.org.cn:8081/cx')


time.sleep(5)
try:
    WebDriverWait(driver, 10).until(
        EC.presence_of_element_located((By.XPATH, "//body"))
    )


    page_text = driver.find_element(By.TAG_NAME, 'body').text
    print(page_text)

finally:
    # 关闭浏览器
    driver.quit()
